<template>
  <el-table
    ref="multipleTable"
    :data="tableData"
    style="width: 100%"
    border
    stripe
    @selection-change="handleSelectionChange"
    @row-click="handleRowClick"
  >
    <!--  :class="{ 'el-icon-document': isActive, 'el-icon-folder-opened': hasError }" -->
    <el-table-column type="selection" width="55"></el-table-column>
    <el-table-column sortable label="名称" @click.stop="qwer">
      <template slot-scope="scope">
        <i :class="scope.row.fold ? 'el-icon-folder-opened' : 'el-icon-document' "></i>
        {{ scope.row.name }}
      </template>
    </el-table-column>
    <el-table-column
      prop="updateTime"
      :formatter="updateTimeFmt"
      label="修改日期"
      width="200"
      align="center"
      sortable
    ></el-table-column>
    <el-table-column sortable prop="creatorName" label="添加入" width="150" align="center"></el-table-column>
    <el-table-column label="排序" width="120" align="center">
      <el-button icon="el-icon-top" circle @click.stop="qwe"></el-button>
      <el-button icon="el-icon-bottom" circle @click.stop="qwe"></el-button>
    </el-table-column>
  </el-table>
</template>

<script>
  export default {
    name: 'DangAnTable',
    props:{
      tableData:{
        type:Array
      }
    },
    data() {
      return {

      }
    },
    created() {

    },
    methods: {
      updateTimeFmt(row) {
        return new Date(row.updateTime).toLocaleString();
      },
      qwe(){

      },
      handleSelectionChange(){

      },
      handleRowClick(row){
        this.$emit('enter-directory',row)
      },
      qwer(){
        // this.$emit('enter-directory')
      }
    }
  }
</script>

<style scoped lang="scss">

</style>
